package com.ftg.learn.framework.spring.annotation;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Scope;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

/**
 * 桔子
 * Component 作为组件  默认的id为类名首字母小写
 *  Service : 示表业务层组件
 *  controller : 控制层组件 restcontroller
 *  mapper   : sql映射器组件
 * @author kangjx
 * @version 1.0
 * @date 2023/9/20 上午10:19
 */
@Data
@Component
public class Orianage {

    public Orianage(){
        System.out.println("构造方法...");
    }

    @Value("6666")
    private int id;

    @Value("大桔子")
    private String name;

    @PostConstruct
    public void abc(){
        System.out.println("我要在构造方法以后走");
    }

}
